#!/usr/bin/env python
import os
import sys
import django

# 设置Django环境使用SQLite
sys.path.append(os.path.dirname(os.path.abspath(__file__)))
os.environ['DJANGO_SETTINGS_MODULE'] = 'config.settings.sqlite_development'
django.setup()

from django.core.management import execute_from_command_line

# 运行迁移
execute_from_command_line(['manage.py', 'migrate'])